<?php
/*
  $Id: checkout_confirmation.php,v 1.139 2003/06/11 17:34:53 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  require_once('includes/application_top.php');

  require_once('includes/application_top.php');

  define('AJAX_NOW', 'yes');
 require(DIR_WS_CLASSES . 'currencies.php');
  $currencies = new currencies();

$_POST['gv_redeem_code']=$gc;

if($cb==1){
tep_session_register('cot_gv');
}else{tep_session_unregister('cot_gv');}
$_POST['i']=2;
 $shipping['title']=$zship.'';
 if (tep_not_null($_POST['tip'])) {
    $tip = tep_db_prepare_input($_POST['tip']);
  }

// load the selected pos_payment module
  require_once(DIR_WS_CLASSES . 'pos_payment.php');
  if ($credit_covers) $pos_payment=''; //rmh M-S_ccgv
  $pos_payment_modules = new pos_payment($pos_payment);
 require_once('includes/classes/pos_cart.php');
 $cart = new posCart;

  require_once(DIR_WS_CLASSES . 'pos_order_total.php'); //rmh M-S_ccgv
    $shipping['cost']=$tip;

  require_once(DIR_WS_CLASSES . 'pos_order.php');
  $pos_order = new pos;

  $pos_payment_modules->update_status();
  $pos_total_modules = new pos_order_total; //rmh M-S_ccgv


  if (is_array($pos_payment_modules->modules)) {
    $pos_payment_modules->pre_confirmation_check();
  }




// load the selected shipping module
  require_once(DIR_WS_CLASSES . 'pos_shipping.php');
  $shipping_modules = new shipping($shipping);




 if (MODULE_ORDER_TOTAL_INSTALLED) {
    $pos_total_modules->process();

    echo $pos_total_modules->output() ;

  }

?>